import Vue from "vue";
import App from "./App.vue";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import vueSeamlessScroll from 'vue-seamless-scroll'
import router from "./router";



import axios from "axios";
axios.defaults.baseURL = '/api'
axios.defaults.headers.post['Content-Type'] = 'application/json'
axios.defaults.params = {
  JSESSIONID: '1daad3de-f0f6-4988-9e9e-6f7cd03d5daa'
};

Vue.config.productionTip = false;
Vue.use(ElementUI);
Vue.use(vueSeamlessScroll);

//保留两位小数
Vue.filter('toFixed', function (value, decimals = 2) {
  if (value === undefined || value === null) return '';
  return parseFloat(value).toFixed(decimals);
});

//时间处理器
Vue.filter('timeToMinutes', function (value) {
  if (!value) return '';
  return value / 60000;
});


new Vue({
  router,
  el: '#app',
  render: (h) => h(App),
}).$mount("#app");
